﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iNet.Media.Imaging
{
	/// <summary>
	/// 影像格式介面。
	/// </summary>
	public interface IImageFormat : IMediaFormat
	{
		/// <summary>
		/// 取得此格式是否為相機原始影像 (RAW) 格式。
		/// </summary>
		bool IsCameraRawFormat { get; }
	}

	#region ImageFormat
	class ImageFormat : MediaFormat, IImageFormat
	{
		#region 欄位
		readonly bool _IsCameraRawFormat;
		#endregion
		#region 建構子
		public ImageFormat(string description, string mimeType, string extension, bool isRawFormat = false)
			: this(description, mimeType, new string[] { extension }, isRawFormat)
		{ }
		public ImageFormat(string description, string mimeType, string[] extensions, bool isRawFormat = false)
			: this(description, new string[] { mimeType }, extensions, isRawFormat)
		{ }
		public ImageFormat(string description, string[] mimeTypes, string[] extensions, bool isRawFormat = false)
			: base(description, mimeTypes, extensions)
		{
			_IsCameraRawFormat = isRawFormat;
		}
		#endregion
		#region IsCameraRawFormat
		public bool IsCameraRawFormat
		{
			get
			{
				return _IsCameraRawFormat;
			}
		}
		#endregion
	}
	#endregion
}
